Skip to content

feat(updater): silent background pre-download and instant install for Compose updater - #1

Open
codeiva11 wants to merge 9 commits into
LagradOst:masterfrom
codeiva11:feat/compose-silent-updater
Open

codeiva11 wants to merge 9 commits into
LagradOst:masterfrom
codeiva11:feat/compose-silent-updater

Conversation

@codeiva11

Copy link
Copy Markdown

Summary

Builds directly on top of your recloudstream#3204 Compose updater architecture by introducing silent background pre-downloading and immediate installation from cached APKs with real-time in-app progress.

What this adds to recloudstream#3204

  1. Silent Background Pre-download:

    • In \ApkUpdater.kt, added \downloadSilently\ to fetch updates in the background without UI interruption during automated checks (\AutoSearchForUpdate).
    • The user is only notified once the APK is fully downloaded and verified on disk.
  2. Instant Install from Cache:

    • In \GithubViewModel.kt, clicking Update checks if the APK is already pre-downloaded in internal cache.
    • If present, \ApkUpdater.installFromFile\ immediately writes to \PackageInstaller.Session\ without download wait times.
    • Falls back gracefully to standard live download if cache is missing.
  3. In-App Installation Progress in Compose:

    • Added \GithubUpdateDialogState.InstallProgress\ to \MainActivityScreen.kt.
    • Displays real-time 0%–100% horizontal progress while writing to the session.
    • Re-enabled \AutoSearchForUpdate\ on \MainActivityScreen\ to allow automated background update discovery.

Verification

  • Built full APK via ./gradlew assemblePrereleaseDebug\ (Build Successful).
  • Verified Kotlin compilation and ABI compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants